xen/arm: acpi: route all unused IRQs to DOM0
authorJulien Grall <julien.grall@arm.com>
Wed, 27 Jul 2016 13:58:29 +0000 (14:58 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 27 Jul 2016 19:24:01 +0000 (12:24 -0700)
commit8eb61ab6fb516165f328e952b9a6363989391267
treee2520d21b5cb23ae56e2d90896c643292d95ecc9
parentb0003bdd6907c7562746b977889dc72cf8fe9e17
xen/arm: acpi: route all unused IRQs to DOM0

It is not possible to know which IRQs will be used by DOM0 when ACPI is
inuse. The approach implemented by this patch, will route all unused
IRQs to DOM0 before it has booted.

The number of IRQs routed is based on the maximum SPIs supported by the
hardware (up to ~1000). However, some of them might not be wired. So we
would allocate resource for nothing.

For each IRQ routed, Xen is allocating memory for irqaction (40 bytes)
and irq_guest (16 bytes). So in the worst case scenario ~54KB of memory
will be allocated. Given that ACPI will mostly be used by server, I
think it is a small drawback.

map_irq_to_domain is slightly reworked to remove the dependency on
device-tree. So the function can be also be used for ACPI and will
avoid code duplication.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
xen/arch/arm/domain_build.c